package com.csun.cmny.provider.model.dto.subscribe;

import com.csun.cmny.provider.validator.OmcMonitorLogValidator;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Data
public class subscribeSaveDto {




    /*计划入住时间*/
    @NotEmpty(message = "{subscribe.consultDate.null}")
    @Size(min = 1, max = 10, message = "{Monitorlog.date.length.error}",groups = {OmcMonitorLogValidator.class})
    @Pattern(regexp="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])"
            + "|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|"
            + "[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$",
            message="{Advisory.date.pattem.error}")
    private String subscribeDate;

    /*咨询人*/
    @NotEmpty(message = "{subscribe.consultName.null}")
    private String consultName;

    /*咨询人电话*/
    @NotEmpty(message = "{subscribe.consultPhone.null}")
    @Pattern(regexp = "^((\\+86)|(86))?(13|15|16|17|18|19)\\d{9}$",
            message = "{subscribe.consultPhone.error}")
    private String consultPhone;

    /*老人名字*/
    @NotEmpty(message = "{subscribe.oldName.null}")
    private String oldName;

    /*老人电话*/
    private String oldPhone;

    /*定金*/
    @NotNull(message = "{subscribe.earnestMoney.null}")
    private BigDecimal earnestMoney;



    /*楼宇*/
    @NotEmpty(message ="{subscribe.buildingName.null}" )
    private String buildingName;

    /*楼层*/
    private Integer floorNo;

    /*房间编号*/
    @NotEmpty(message ="{subscribe.roomNo.null}" )
    private String roomNo;

    /*床位id*/
    private Long bedId;

    /*床位编号*/
    private String bedNo;



    /*支付方式 */
    @NotEmpty(message ="{subscribe.payment.null}" )
    private String payment;
}
